<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//前台路由组  控制器在 "App\Http\Controllers\Home" 命名空间下
Route::group(['namespace' => 'Index'], function(){
    // 默认访问index控制器下的index方法
    Route::view('/', 'home');
});

//后台路由组 控制器在 "App\Http\Controllers\Admin" 命名空间下
Route::group(['namespace' => 'Admin', 'prefix' => 'admin'], function(){
    // 后台的首页
    Route::view('/', 'admin');
});
